Skip to main content

Get Signed Document API

This document highlights the Get Signed Document API details.

Description

Objective

The Get Signed Document API retrieves the signed or unsigned document's URL, along with its signing status, expiry status, and any failure reason. It is used to check the status and validity of a document in the signing process.

InputOutput
The document ID and skipBase64 flag to determine the document's base64 encoding statusThe document URL (signed/unsigned), signing status, expiry status, and failure reason (if any)

API URL

https://ind-engine.thomas.hyperverge.co/v1/getSignedDocument

API Endpoint

getSignedDocument

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
transactionIdMandatoryA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Inputs

The following table provides the complete information on all the input parameters for the module.

ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
documentIdA unique document ID for each signerMandatoryNot ApplicableNot Applicable
serviceIdThe Identifier for the ASP in useMandatoryNot ApplicableNot Applicable
skipBase64Mandatory field - true to be passed for all casesMandatorytrueNot Applicable

Request

The following code snippet demonstrates a standard curl request for the API:

curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/getSignedDocument' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"documentId": "<Enter_the_document_ID>",
"serviceId": "<Enter_the_service_ID>"
}'

Success Response

The following is a success response from the API:

{
"status": "success",
"statusCode": "200",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"data": {
"documentId": "<Document_ID>",
"s3Url": "<Signed_Document_URL>",
"signed": true,
"expired": false,
"userCertDetails": {
"name": "<Name_of_the_User>",
"pincode": "<Pincode>",
"gender": "<Gender>",
"state": "<State>",
"title": "<Title>",
"yob": "<Year_of_Birth>"
},
"inviteeDetails": {
"inviteeName": "<Invitee_Name>",
"inviteeEmail": "<Invitee_Email>"
}
}
}
}

Success Response Details

The following table highlights the details of the success response from the API:

ParameterTypeDescription
statusstringThe status of the request
statusCodeintegerThe status code of the request
metaDataobjectMetadata related to the request
metaData.requestIdstringA unique identifier for the request
metaData.transactionIdstringA unique identifier for the transaction
documentIdstringThe unique identifier for the document
s3UrlstringThe S3 URL containing the signed document
signedbooleanIndicates whether the document has been signed
expiredbooleanIndicates whether the signed document has expired
namestringThe name of the signer as per Aadhaar
pincodestringThe pincode of the signer as per Aadhaar
genderstringThe gender of the signer as per Aadhaar
statestringThe state of the signer as per Aadhaar
titlestringThe last four digits of the signer's Aadhaar number
yobstringThe year of birth of the signer as per Aadhaar
inviteeNamestringThe name of the invitee
inviteeEmailstringThe email address of the invitee
failureReasonstringThe reason for failure if the status code is not 200

Error Response Samples

The following are some sample error responses from the API.

{
"status": "failure",
"statusCode": "400",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>",
"error": {
"code": "Required file input is missing",
"message": "The request is missing the mandatory file input"
}
},
"result": {
"data": {
"documentId": "<Document_ID>",
"serviceId": "<Service_ID>",
"skipBase64": true,
"failureReason": "<Failure_Reason>"
}
}
}

Error Response Details

A failure or error response from the module contains a failure status, with a relavant status code and error message. The following table lists all error responses.

Status CodeError MessageError Description
400Required file input is missingThe request is missing the mandatory file input
400Error while parsing file inputAn error occurred while parsing the provided file input
400Document ID not foundThe requested document ID could not be found
400Document DeletedThe requested document has been deleted
404Document not foundThe document could not be found on Leegality's end
500Unknown error while parsing inputsThe request encountered an unknown error while parsing the inputs
500Internal Server ErrorPlease check the request headers or contact support for resolution
500PDF generation failedThe process of generating the PDF failed
503External vendor downtimeThe external vendor is currently experiencing downtime
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: